package com.immortal.core.configure;

import com.google.common.collect.Lists;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>TODO
 *
 * @author wind
 * @version 1.0
 * @since 2018/12/15
 */
@Component
@ConfigurationProperties(prefix = "im")
@Data
public class ImConfig {
    private ImSecurity security;

    private ImOauthUrl oauthUrl;

    private List<String> loginUrl=Lists.newArrayList();

    private String loginFormUrl;
    @Data
    public static class ImOauthUrl{
        private List<String>  auth= Lists.newArrayList();
        private List<String>  ignore=Lists.newArrayList();
    }

    @Data
    public static class ImSecurity {
        private ImSecurityActuator actuator;
        private ImSecurityBootAdmin bootAdmin;

    }

    @Data
    public static class ImSecurityBootAdmin {
        private Boolean enabled;
    }

    @Data
    public static class ImSecurityActuator {
        private Boolean enabled;
    }
}
